1. Related Field
The present invention relates to a method for flow control of a digital data stream that is to be transmitted with limited bit rate. The transmission link may e.g. be a radio link or an interface to a data storage. The invention can typically be applied in any product where data compression is used to reduce the amount of data from a source e.g. a video source. The invention also relates to a corresponding apparatus and computer program.
2. Description of Related Art
Two very common techniques in terms of compression ratio control of lossy video compression algorithms are Constant Quality (CQ) and Constant Bit rate (CB). Quality, in this context, refers to how well the decompressed data reproduces the original data. The quality of an image may e.g. be the resolution of the decompressed image.
When using CQ, a least acceptable quality level is set and the bit rate of the compressed data stream is allowed to fluctuate over time in order to always meet this quality level regardless of the current image content.
When using Constant Bit rate (CB), a maximum allowed bit rate is set and the quality is allowed to fluctuate over time in order to ensure that the maximum allowed bit rate is never exceeded, regardless of the current image content.
Most compression algorithms can achieve very high compression ratio and yet maintain the image quality, when applied on a low complexity image. However, when applied on a high complexity image, the result is the opposite. The complexity of the incoming images is rarely known beforehand. This implies that the compression ratio of the compression algorithm over time is unknown.
It is often desired to have a constant quality (CQ). However, in recording or network applications, the use of CQ often implies a risk of temporary exceeding the bit rate of the downstream destinations. Using CQ also means that it is impossible to forsee the size of the storage media needed to store a given segment in time. To avoid running into problems related to the abovementioned issues, one needs to design for “worst case”. This however means that one is likely to end up with a storage media that is far bigger than it probably needs to be for most use cases, which in turn drives complexity and thereby cost of the product.
In many applications CB is therefore commonly used instead of CQ. Using CB implies that one is able to design the bit rates of all involved interfaces the data is supposed to pass though from source to destination, for a known maximum allowed bit rate. Using CB also means that one is able to guarantee that a required segment of time will fit on a storage media of a specified size. However, the use of CB also has its drawbacks in terms of fluctuating quality in certain applications. Especially, when using CB mode with a video compression algorithm only utilzing intra-frame compression i.e. frame by frame compression, the user is likely to experience these drawbacks.
Hence, selecting among the existing methods often implies a compromise between risk of bad quality and the cost of higher bit rate channels and larger memories. Therefore, finding a way to provide optimized quality given a maximum bit rate would be most welcome.